﻿<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<title>命名空间-解决函数重名</title>
		<script>
			var zns = {};
			zns.common = {};
			zns.fx = {};
			zns.site = {};

			zns.common.getUser = function() {
				alert('a');
			};

			zns.fx.getUser = function() {
				alert('b');
			};

			zns.site.getUser = function() {
				alert('c');
			};

			zns.common.getUser();
			zns.fx.getUser();
			zns.site.getUser();
		</script>
	</head>

	<body>
	</body>

</html>